package com.mall.domain.po;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @description: 购物车
 * @author 勾新杰
 * @version 1.0
 * @date 2024/11/24 20:27
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "购物车")
public class Cart {
    @Schema(description = "购物车id")
    private Long id;
    @Schema(description = "用户id")
    private Long userId;
    @Schema(description = "商品id")
    private Long itemId;
    @Schema(description = "购买数量")
    private Integer quantity;
    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @Schema(description = "修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
